import request from '@/utils/request'
// 更新浏览记录
export function updateNoticesRecord(id,data) {
    return request({
        url: '/api/notices/update/record/'+id,
        method: 'put',
        data: data
    })
}
// 查询列表
export function findAllNotices(query) {
    return request({
        url: '/api/notices/list',
        method: 'post',
        data: query
    })
}
// 查询详情
export function getNotices(id) {
    return request({
        url: '/api/notices/' + id,
        method: 'get'
    })
}

// 新增
export function addNotices(data) {
    return request({
        url: '/api/notices/',
        method: 'post',
        data: data
    })
}

// 修改
export function updateNotices(id,data) {
    return request({
        url: '/api/notices/update/'+id,
        method: 'put',
        data: data
    })
}

// 删除
export function delNotices(id) {
    return request({
      url: `/api/notices/${id}/off`,
        method: 'DELETE'
    })
}